<?php 
if(isset($query))
    $fila = $query->row();
?>
<div class="yui-g">

    <div id="contenido">
        <form action="<?=base_url()?>index.php/admin/banners/guardar" method="post">
            <table class="espaciado2" border="1" width="90%">
                <tbody>
                    <tr>
                        <td><label><?=lang('nombre_noticia');?></label></td>
                        <td><input type="text" name="nombre" <?php if(isset($query)) echo 'value="'.$fila->nombre.'"';?> size="50" /></td>
                    </tr>
                    <tr>
                        <td><label><?=lang('peso_noticia');?></label></td>
                        <td><input type="text" name="peso" <?php if(isset($query)) echo 'value="'.$fila->peso.'"';?> size="10" /></td>
                    </tr>
                    <tr>
                        <td><label><?=lang('tipo_noticia');?></label></td>
                        <td>
                            <select name="tipo">
                                <?php if(isset($query)):?>
                                    <?php if ($fila->tipo=="publico"):?>
                                <option value="publico" selected><?=lang('publico_noticia');?></option>
                                <option value="privado"><?=lang('privado_noticia');?></option>
                                    <?php else:?>
                                <option value="publico"><?=lang('publico_noticia');?></option>
                                <option value="privado" selected><?=lang('privado_noticia');?></option>
                                    <?php endif;?>
                                <?php else:?>
                                <option value="publico"><?=lang('publico_noticia');?></option>
                                <option value="privado" selected><?=lang('privado_noticia');?></option>
                                <?php endif;?>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            Contenido del Banner<br>
                            <?=$fck1?>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <?=lang('ampliada_noticia');?><br>
                            <?=$fck2?>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <input type="hidden" name="id" <?php if(isset($query)) echo 'value="'.$fila->id.'"';?> />
                            <input type="submit" name="Enviar" value="<?=lang('guardar_noticia');?>">
                        </td>
                    </tr>
                </tbody>
            </table>
        </form>
    </div>
</div>
<div style="clear : left;"></div>
<!-- fin contenido -->
